package com.azusa.common.exception;

public class ErrorInfoException extends Exception {
	private static final long serialVersionUID = 4419713410938910528L;
	private ErrorInfo errorInfo;
	
	public ErrorInfoException(ErrorInfo errorInfo){
		super("[" + errorInfo.getErrorCode() + "]:" + errorInfo.getDescription());
		this.errorInfo = errorInfo;
	}
	
	public ErrorInfoException(ErrorInfo errorInfo, Throwable cause){		
		super("[" + errorInfo.getErrorCode() + "]:" + errorInfo.getDescription(), cause);
		this.errorInfo = errorInfo;
	}

	public ErrorInfo getErrorInfo() {
		return errorInfo;
	}

	public void setErrorInfo(ErrorInfo errorInfo) {
		this.errorInfo = errorInfo;
	}
}
